import request from '../utils/request.js'

/**
 *获取-角色列表
 */
export const getUserInfoAPI = (params) => {
  return request({
    url: '/sys/role',
    params: params
  })
}
/**
 * 删除功能
 */
export const deleteUserInfoAPI = (id) => {
  return request({
    url: `/sys/role/${id}`,
    method: 'delete'
  })
}

export const AddUserInfoAPI = (data) => {
  return request({
    url: '/sys/role',
    method: 'post',
    data
  })
}
/**
 * 获取角色详情
 */
export const getUserAPI = (id) => {
  return request({
    url: `/sys/role/${id}`
  })
}
/**
 * 修改功能
 */
export const UpdateUserInfoAPI = (data) => {
  return request({
    url: `/sys/role/${data.id}`,
    method: 'put',
    data
  })
}
/**
 * 根据id查询企业
 */
export const getID = (id) => {
  return request({
    url: `/company/${id}`
  })
}
